package com.atguigu.feign.impl;

import com.atguigu.domain.Product;
import com.atguigu.feign.OrderFeign;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Component
public class OrderFeignImpl implements OrderFeign {
    @Override
    public Product getProductById(String id) {
        System.out.println("兜底回调");
        Product product = new Product();
        product.setId(id);
        product.setPrice(new BigDecimal("0"));
        product.setProductName("暂无数据");
        product.setNum(0);
        return product;
    }
}
